Skip to content

docs(testing): improve standalone testing documentation - #31313

Merged
thetaPC merged 3 commits into
ionic-team:mainfrom
Zac-Smucker-Bryan:standalone-testing-docs-update
Aug 10, 2026
Merged

docs(testing): improve standalone testing documentation#31313
thetaPC merged 3 commits into
ionic-team:mainfrom
Zac-Smucker-Bryan:standalone-testing-docs-update

Conversation

@Zac-Smucker-Bryan

Copy link
Copy Markdown
Contributor

Issue number: resolves #31312


What is the current behavior?

Current docs don't provide recommended testing guidance for accurately testing standalone components. This can create issues because a standalone (custom-elements) build doesn't expose el.componentOnReady(), so any test that reads fixture.nativeElement before hydration in a standalone project has the potential to not be testing what they think they are.

What is the new behavior?

  • Adds a couple of sentences to talk about using the existing componentOnReady helper from @ionic/core in Angular's testing.md file
  • Adds the same standalone guidance to the testing.md files for React and Vue

Does this introduce a breaking change?

  • Yes
  • No

Add context about using exported `componentOnReady` helper to make tests more accurate for custom-element builds.
@Zac-Smucker-Bryan
Zac-Smucker-Bryan requested a review from a team as a code owner July 31, 2026 02:26
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

@Zac-Smucker-Bryan is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview Aug 10, 2026 6:46pm

Request Review

@Zac-Smucker-Bryan Zac-Smucker-Bryan changed the title docs: improve standalone testing documentation docs(testing): improve standalone testing documentation Aug 4, 2026

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up, the Angular section is solid. The React and Vue sections are that same section copied across though, and the facts don't carry over (no /standalone route in either test app, no IonicModule outside Angular), so please verify guidance against each framework's own source before duplicating it. Suggestions left inline.

Comment thread docs/react/testing.md Outdated
Comment thread docs/react/testing.md Outdated
Comment thread docs/vue/testing.md Outdated
Comment thread docs/vue/testing.md Outdated
Accept changes from code review, clarifying for each framework.

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
@Zac-Smucker-Bryan

Copy link
Copy Markdown
Contributor Author

OK, changes accepted. Let me know if you need anything else from me.

Comment thread docs/angular/testing.md Outdated
Helper explanation in its own section since it applies to both routes, and mapped the helper's two branches onto /lazy and /standalone so it's clear what guarantee each one gives.

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@thetaPC
thetaPC added this pull request to the merge queue Aug 10, 2026
Merged via the queue into ionic-team:main with commit 625f9c3 Aug 10, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: documentation for standalone component testing

2 participants